Integrand size = 39, antiderivative size = 273 \[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^3 (4 A b+a B) x+\frac {\left (32 a^3 b B+16 a b^3 B+8 a^4 C+24 a^2 b^2 (2 A+C)+b^4 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}+\frac {b \left (34 a^2 b B+4 b^3 B-a^3 (12 A-19 C)+8 a b^2 (3 A+2 C)\right ) \tan (c+d x)}{6 d}+\frac {b^2 \left (32 a b B-a^2 (24 A-26 C)+3 b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{24 d}-\frac {b (12 a A-4 b B-7 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}-\frac {b (4 A-C) (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d} \]
[Out]
Time = 0.66 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4179, 4141, 4133, 3855, 3852, 8} \[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^3 x (a B+4 A b)+\frac {b^2 \tan (c+d x) \sec (c+d x) \left (-\left (a^2 (24 A-26 C)\right )+32 a b B+3 b^2 (4 A+3 C)\right )}{24 d}+\frac {b \tan (c+d x) \left (-\left (a^3 (12 A-19 C)\right )+34 a^2 b B+8 a b^2 (3 A+2 C)+4 b^3 B\right )}{6 d}+\frac {\left (8 a^4 C+32 a^3 b B+24 a^2 b^2 (2 A+C)+16 a b^3 B+b^4 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{8 d}-\frac {b \tan (c+d x) (12 a A-7 a C-4 b B) (a+b \sec (c+d x))^2}{12 d}-\frac {b (4 A-C) \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}+\frac {A \sin (c+d x) (a+b \sec (c+d x))^4}{d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 4133
Rule 4141
Rule 4179
Rubi steps \begin{align*} \text {integral}& = \frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}+\int (a+b \sec (c+d x))^3 \left (4 A b+a B+(b B+a C) \sec (c+d x)-b (4 A-C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}-\frac {b (4 A-C) (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{4} \int (a+b \sec (c+d x))^2 \left (4 a (4 A b+a B)+\left (4 A b^2+8 a b B+4 a^2 C+3 b^2 C\right ) \sec (c+d x)-b (12 a A-4 b B-7 a C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}-\frac {b (12 a A-4 b B-7 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}-\frac {b (4 A-C) (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{12} \int (a+b \sec (c+d x)) \left (12 a^2 (4 A b+a B)+\left (36 a^2 b B+8 b^3 B+12 a^3 C+a b^2 (36 A+23 C)\right ) \sec (c+d x)+b \left (32 a b B-a^2 (24 A-26 C)+3 b^2 (4 A+3 C)\right ) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}+\frac {b^2 \left (32 a b B-a^2 (24 A-26 C)+3 b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{24 d}-\frac {b (12 a A-4 b B-7 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}-\frac {b (4 A-C) (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{24} \int \left (24 a^3 (4 A b+a B)+3 \left (32 a^3 b B+16 a b^3 B+8 a^4 C+24 a^2 b^2 (2 A+C)+b^4 (4 A+3 C)\right ) \sec (c+d x)+4 b \left (34 a^2 b B+4 b^3 B-a^3 (12 A-19 C)+8 a b^2 (3 A+2 C)\right ) \sec ^2(c+d x)\right ) \, dx \\ & = a^3 (4 A b+a B) x+\frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}+\frac {b^2 \left (32 a b B-a^2 (24 A-26 C)+3 b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{24 d}-\frac {b (12 a A-4 b B-7 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}-\frac {b (4 A-C) (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{6} \left (b \left (34 a^2 b B+4 b^3 B-a^3 (12 A-19 C)+8 a b^2 (3 A+2 C)\right )\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{8} \left (32 a^3 b B+16 a b^3 B+8 a^4 C+24 a^2 b^2 (2 A+C)+b^4 (4 A+3 C)\right ) \int \sec (c+d x) \, dx \\ & = a^3 (4 A b+a B) x+\frac {\left (32 a^3 b B+16 a b^3 B+8 a^4 C+24 a^2 b^2 (2 A+C)+b^4 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}+\frac {b^2 \left (32 a b B-a^2 (24 A-26 C)+3 b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{24 d}-\frac {b (12 a A-4 b B-7 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}-\frac {b (4 A-C) (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}-\frac {\left (b \left (34 a^2 b B+4 b^3 B-a^3 (12 A-19 C)+8 a b^2 (3 A+2 C)\right )\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{6 d} \\ & = a^3 (4 A b+a B) x+\frac {\left (32 a^3 b B+16 a b^3 B+8 a^4 C+24 a^2 b^2 (2 A+C)+b^4 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {A (a+b \sec (c+d x))^4 \sin (c+d x)}{d}+\frac {b \left (34 a^2 b B+4 b^3 B-a^3 (12 A-19 C)+8 a b^2 (3 A+2 C)\right ) \tan (c+d x)}{6 d}+\frac {b^2 \left (32 a b B-a^2 (24 A-26 C)+3 b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{24 d}-\frac {b (12 a A-4 b B-7 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}-\frac {b (4 A-C) (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(813\) vs. \(2(273)=546\).
Time = 15.34 (sec) , antiderivative size = 813, normalized size of antiderivative = 2.98 \[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (-48 a^2 A b^2-4 A b^4-32 a^3 b B-16 a b^3 B-8 a^4 C-24 a^2 b^2 C-3 b^4 C\right ) \cos ^6(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{4 d (b+a \cos (c+d x))^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {\left (48 a^2 A b^2+4 A b^4+32 a^3 b B+16 a b^3 B+8 a^4 C+24 a^2 b^2 C+3 b^4 C\right ) \cos ^6(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{4 d (b+a \cos (c+d x))^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {\cos ^2(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (144 a^3 A b (c+d x)+36 a^4 B (c+d x)+192 a^3 A b (c+d x) \cos (2 (c+d x))+48 a^4 B (c+d x) \cos (2 (c+d x))+48 a^3 A b (c+d x) \cos (4 (c+d x))+12 a^4 B (c+d x) \cos (4 (c+d x))+12 a^4 A \sin (c+d x)+12 A b^4 \sin (c+d x)+48 a b^3 B \sin (c+d x)+72 a^2 b^2 C \sin (c+d x)+33 b^4 C \sin (c+d x)+96 a A b^3 \sin (2 (c+d x))+144 a^2 b^2 B \sin (2 (c+d x))+32 b^4 B \sin (2 (c+d x))+96 a^3 b C \sin (2 (c+d x))+128 a b^3 C \sin (2 (c+d x))+18 a^4 A \sin (3 (c+d x))+12 A b^4 \sin (3 (c+d x))+48 a b^3 B \sin (3 (c+d x))+72 a^2 b^2 C \sin (3 (c+d x))+9 b^4 C \sin (3 (c+d x))+48 a A b^3 \sin (4 (c+d x))+72 a^2 b^2 B \sin (4 (c+d x))+8 b^4 B \sin (4 (c+d x))+48 a^3 b C \sin (4 (c+d x))+32 a b^3 C \sin (4 (c+d x))+6 a^4 A \sin (5 (c+d x))\right )}{48 d (b+a \cos (c+d x))^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))} \]
[In]
[Out]
Time = 1.50 (sec) , antiderivative size = 355, normalized size of antiderivative = 1.30
method | result | size |
derivativedivides | \(\frac {a^{4} A \sin \left (d x +c \right )+B \,a^{4} \left (d x +c \right )+a^{4} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 A \,a^{3} b \left (d x +c \right )+4 B \,a^{3} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 C \tan \left (d x +c \right ) a^{3} b +6 A \,a^{2} b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 B \tan \left (d x +c \right ) a^{2} b^{2}+6 C \,a^{2} b^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+4 A \tan \left (d x +c \right ) a \,b^{3}+4 B a \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 C a \,b^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+A \,b^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B \,b^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,b^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(355\) |
default | \(\frac {a^{4} A \sin \left (d x +c \right )+B \,a^{4} \left (d x +c \right )+a^{4} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 A \,a^{3} b \left (d x +c \right )+4 B \,a^{3} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 C \tan \left (d x +c \right ) a^{3} b +6 A \,a^{2} b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 B \tan \left (d x +c \right ) a^{2} b^{2}+6 C \,a^{2} b^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+4 A \tan \left (d x +c \right ) a \,b^{3}+4 B a \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 C a \,b^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+A \,b^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B \,b^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,b^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(355\) |
parallelrisch | \(\frac {-144 \left (\left (\frac {A}{12}+\frac {C}{16}\right ) b^{4}+\frac {B a \,b^{3}}{3}+a^{2} \left (A +\frac {C}{2}\right ) b^{2}+\frac {2 B \,a^{3} b}{3}+\frac {a^{4} C}{6}\right ) \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+144 \left (\left (\frac {A}{12}+\frac {C}{16}\right ) b^{4}+\frac {B a \,b^{3}}{3}+a^{2} \left (A +\frac {C}{2}\right ) b^{2}+\frac {2 B \,a^{3} b}{3}+\frac {a^{4} C}{6}\right ) \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+384 d \,a^{3} \left (A b +\frac {a B}{4}\right ) x \cos \left (2 d x +2 c \right )+96 d \,a^{3} \left (A b +\frac {a B}{4}\right ) x \cos \left (4 d x +4 c \right )+192 \left (\frac {B \,b^{3}}{3}+\left (A +\frac {4 C}{3}\right ) a \,b^{2}+\frac {3 B \,a^{2} b}{2}+a^{3} C \right ) b \sin \left (2 d x +2 c \right )+\left (\left (24 A +18 C \right ) b^{4}+96 B a \,b^{3}+144 C \,a^{2} b^{2}+36 a^{4} A \right ) \sin \left (3 d x +3 c \right )+96 b \left (\frac {B \,b^{3}}{6}+a \left (A +\frac {2 C}{3}\right ) b^{2}+\frac {3 B \,a^{2} b}{2}+a^{3} C \right ) \sin \left (4 d x +4 c \right )+12 a^{4} A \sin \left (5 d x +5 c \right )+\left (\left (24 A +66 C \right ) b^{4}+96 B a \,b^{3}+144 C \,a^{2} b^{2}+24 a^{4} A \right ) \sin \left (d x +c \right )+288 d \,a^{3} \left (A b +\frac {a B}{4}\right ) x}{24 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(436\) |
norman | \(\frac {\left (-4 A \,a^{3} b -B \,a^{4}\right ) x +\left (-20 A \,a^{3} b -5 B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-16 A \,a^{3} b -4 B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (4 A \,a^{3} b +B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (16 A \,a^{3} b +4 B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (20 A \,a^{3} b +5 B \,a^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {\left (8 a^{4} A -32 a A \,b^{3}+4 A \,b^{4}-48 B \,a^{2} b^{2}+16 B a \,b^{3}-8 B \,b^{4}-32 a^{3} b C +24 C \,a^{2} b^{2}-32 C a \,b^{3}+5 C \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{4 d}-\frac {\left (8 a^{4} A +32 a A \,b^{3}+4 A \,b^{4}+48 B \,a^{2} b^{2}+16 B a \,b^{3}+8 B \,b^{4}+32 a^{3} b C +24 C \,a^{2} b^{2}+32 C a \,b^{3}+5 C \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {\left (120 a^{4} A -288 a A \,b^{3}+12 A \,b^{4}-432 B \,a^{2} b^{2}+48 B a \,b^{3}-40 B \,b^{4}-288 a^{3} b C +72 C \,a^{2} b^{2}-160 C a \,b^{3}-9 C \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{12 d}+\frac {\left (120 a^{4} A -96 a A \,b^{3}-12 A \,b^{4}-144 B \,a^{2} b^{2}-48 B a \,b^{3}-8 B \,b^{4}-96 a^{3} b C -72 C \,a^{2} b^{2}-32 C a \,b^{3}-3 C \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{6 d}-\frac {\left (120 a^{4} A +96 a A \,b^{3}-12 A \,b^{4}+144 B \,a^{2} b^{2}-48 B a \,b^{3}+8 B \,b^{4}+96 a^{3} b C -72 C \,a^{2} b^{2}+32 C a \,b^{3}-3 C \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{6 d}+\frac {\left (120 a^{4} A +288 a A \,b^{3}+12 A \,b^{4}+432 B \,a^{2} b^{2}+48 B a \,b^{3}+40 B \,b^{4}+288 a^{3} b C +72 C \,a^{2} b^{2}+160 C a \,b^{3}-9 C \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{5}}-\frac {\left (48 A \,a^{2} b^{2}+4 A \,b^{4}+32 B \,a^{3} b +16 B a \,b^{3}+8 a^{4} C +24 C \,a^{2} b^{2}+3 C \,b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (48 A \,a^{2} b^{2}+4 A \,b^{4}+32 B \,a^{3} b +16 B a \,b^{3}+8 a^{4} C +24 C \,a^{2} b^{2}+3 C \,b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(840\) |
risch | \(4 a^{3} A b x +B \,a^{4} x +\frac {i a^{4} A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {i b \left (96 a^{3} C +64 C a \,b^{2}+96 A a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-48 B a \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+144 B \,a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}-48 B a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+48 B a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}+72 C \,a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+288 A a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+256 C a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+72 C \,a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}+16 B \,b^{3}+144 B \,a^{2} b +96 a A \,b^{2}+33 C \,b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-12 A \,b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+48 B \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+64 B \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+12 A \,b^{3} {\mathrm e}^{i \left (d x +c \right )}+9 C \,b^{3} {\mathrm e}^{i \left (d x +c \right )}+288 C \,a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-12 A \,b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-9 C \,b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+96 C \,a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+288 C \,a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+12 A \,b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-33 C \,b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-72 C \,a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}+288 A a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+192 C a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+432 B \,a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+432 B \,a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+48 B a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-72 C \,a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {i a^{4} A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {6 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A \,a^{2} b^{2}}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A \,b^{4}}{2 d}-\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,a^{3} b}{d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B a \,b^{3}}{d}-\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,a^{2} b^{2}}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,b^{4}}{8 d}+\frac {6 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A \,a^{2} b^{2}}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A \,b^{4}}{2 d}+\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,a^{3} b}{d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B a \,b^{3}}{d}+\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,a^{2} b^{2}}{d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,b^{4}}{8 d}\) | \(882\) |
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.11 \[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {48 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} d x \cos \left (d x + c\right )^{4} + 3 \, {\left (8 \, C a^{4} + 32 \, B a^{3} b + 24 \, {\left (2 \, A + C\right )} a^{2} b^{2} + 16 \, B a b^{3} + {\left (4 \, A + 3 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (8 \, C a^{4} + 32 \, B a^{3} b + 24 \, {\left (2 \, A + C\right )} a^{2} b^{2} + 16 \, B a b^{3} + {\left (4 \, A + 3 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (24 \, A a^{4} \cos \left (d x + c\right )^{4} + 6 \, C b^{4} + 16 \, {\left (6 \, C a^{3} b + 9 \, B a^{2} b^{2} + 2 \, {\left (3 \, A + 2 \, C\right )} a b^{3} + B b^{4}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (24 \, C a^{2} b^{2} + 16 \, B a b^{3} + {\left (4 \, A + 3 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} + 8 \, {\left (4 \, C a b^{3} + B b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
[In]
[Out]
\[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{4} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 431, normalized size of antiderivative = 1.58 \[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {48 \, {\left (d x + c\right )} B a^{4} + 192 \, {\left (d x + c\right )} A a^{3} b + 64 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a b^{3} + 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B b^{4} - 3 \, C b^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 72 \, C a^{2} b^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 48 \, B a b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, A b^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 24 \, C a^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 96 \, B a^{3} b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 144 \, A a^{2} b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, A a^{4} \sin \left (d x + c\right ) + 192 \, C a^{3} b \tan \left (d x + c\right ) + 288 \, B a^{2} b^{2} \tan \left (d x + c\right ) + 192 \, A a b^{3} \tan \left (d x + c\right )}{48 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 840 vs. \(2 (262) = 524\).
Time = 0.38 (sec) , antiderivative size = 840, normalized size of antiderivative = 3.08 \[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 21.14 (sec) , antiderivative size = 4710, normalized size of antiderivative = 17.25 \[ \int \cos (c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display} \]
[In]
[Out]